package com.turnengine.client.global.game.comparator;

import com.turnengine.client.global.game.bean.Game;
import java.util.Comparator;
import org.apache.commons.lang.builder.CompareToBuilder;

/**
 * The Game Comparator.
 */
public class GameComparator implements Comparator<Game> {

	@Override
	public int compare(Game compare1, Game compare2) {
				CompareToBuilder builder = new CompareToBuilder();
				builder.append(compare1.getId(), compare2.getId());
				builder.append(compare1.getName(), compare2.getName());
				return builder.toComparison();
	}
}
